<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/style1.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jQuery-2.1.3.min.js"></script>
<script language="javascript">
$(function(){	
	//导航切换
	$(".imglist li").click(function(){
		$(".imglist li.selected").removeClass("selected")
		$(this).addClass("selected");
	})	
})	
</script>
</head>


<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">模块设计</a></li>
    <li><a href="#">图片</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    
    <div class="tools">
    
        <ul class="toolbar1">
        <li><span><img src="images/t05.png" /></span>设置</li>
        </ul>
    
    </div>
    
    
    <ul class="imglist">
    <c:forEach items="${result.list }" var="world" >
    	<li class="selected" style="width:158px;height: 170px">
    	<span><img src="${world.limg }" style="width: 140px;height: 130px"/></span>
    		<p>
    			<a href="javascript:;" class="myId">${world.checkStatus }</a>
    			<input type="hidden" value="${world.lid }" name="lid" />
    		</p>
    	</li>
    </c:forEach>
    </ul>
    
   
    <div class="pagin">
    	<div class="message">共<i class="blue">${result.counts }</i>条记录，当前显示第&nbsp;<i class="blue">${result.pageNum }&nbsp;</i>页</div>
        <ul class="paginList">
        <c:forEach  var="i" begin="1" end="${result.pages }" step="1">
	        <li class="paginItem"><a href="javascript:;" onclick="findImgs('${i}',this)">${i }</a></li>
        </c:forEach>
        </ul>
    </div>
    <!--<li class="paginItem current"><a href="javascript:;">2</a></li>  -->
    
    <div class="tip">
    	<div class="tiptop"><span>提示信息</span><a></a></div>
        
      <div class="tipinfo">
        <span><img src="images/ticon.png" /></span>
        <div class="tipright">
        <p>是否确认对信息的修改 ？</p>
        <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
        </div>
        
        <div class="tipbtn">
        <input name="" type="button"  class="sure" value="确定" />&nbsp;
        <input name="" type="button"  class="cancel" value="取消" />
        </div>
    
    </div>
    </div>
<script type="text/javascript">
	function findImgs(page,mythis) {
		$(mythis).parent().addClass("current");
		//alert("aaaa");
		//console.log($(mythis).parent().text());
		var pageSize = 20;
		location.href = "world/findAllImgsByPage?page=" + page +"&pageSize=" + pageSize;
	}
		$(".myId").click(function() {
			var lstatus = $(this).text();
			if("已审核" == lstatus) {
				lstatus = 1;
			}else {
				lstatus = 0;
			}
			var lid = $(this).next().val();
			console.log(lstatus);
			location.href = "world/updateStatus?lstatus=" + lstatus + "&lid=" + lid;
		});

</script>
</body>
</html>
